|
CruiseControl.NET : NUnit Task
This page last changed on Mar 14, 2009 by dcameron.
This task enables you to instruct CCNet to run the unit tests contained within a collection of assemblies. The results of the unit tests will be automatically included in the CCNet build results. This can be useful if you have some unit tests that you want to run as part of the integration process, but you don't need as part of your developer build process. For example, if you have a set of integration tests that you want to run in a separate build process, it is easy to set up a project to use this task. If you are using the Visual Studio Task and you want to run unit tests then you probably want to use this task. Alternatively you can run NUnit using post-build tasks in your Visual Studio project properties.
Configuration Elements
* Due to a limitation in the 2.2.x version of the nunit console, all test assemblies must be located in the same directory. The problem is that the nunit-console does not change the working directory before executing each assembly. As a result, dependencies for the subsequent assemblies will not be located by nunit. The options are to either a) include all assemblies to test in the same directory or b) to use separate NUnit Tasks for each assembly. Configuration ExampleThe configuration for the NUnitTask should be placed in the <tasks> section of the Configuring the Server file. <tasks> <nunit> <path>D:\dev\ccnet\ccnet\tools\nunit\nunit-console.exe</path> <assemblies> <assembly>D:\dev\Refactoring\bin\Debug\Refactoring.exe</assembly> <assembly>D:\dev\Refactoring\bin\Debug\Refactoring.Core.dll</assembly> </assemblies> <excludedCategories> <excludedCategory>LongRunning</excludedCategory> </excludedCategories> </nunit> </tasks> |
| Document generated by Confluence on Mar 14, 2009 02:55 |